<extend name="./Base/base" />

<block name="main">
<div class="col-lg-12 col-md-10 col-sm-12">
	<div class="panel">
			<div class="panel-body">
				<div class="text-left bk-bg-white bk-padding-top-40 bk-padding-bottom-10">
					<div class="row">
						<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 bk-vcenter text-center">                                
							<div class="bk-avatar">
								<img src="__PUBLIC__/article/{$moder['img']}" alt="" class="img-circle bk-img-120 bk-border-light-gray bk-border-3x">
							</div>
							<h4 class="bk-margin-top-10 bk-docs-font-weight-300">{$moder['title']}</h4>
						</div>
						<hr class="bk-margin-off">
						<div class="col-lg-16 col-md-16 col-sm-16 col-xs-16">														
							<a class="col-xs-4 bk-bg-white bk-fg-primary bk-padding-top-20 bk-padding-bottom-20 text-center">
								<i class="fa fa-facebook"></i>
							</a>
							<a class="col-xs-4 bk-bg-white bk-fg-success bk-padding-top-20 bk-padding-bottom-20 text-center">
								<i class="fa fa-twitter"></i>
							</a>
							<a class="col-xs-4 bk-bg-white bk-fg-danger bk-padding-top-20 bk-padding-bottom-20 text-center">
								<i class="fa fa-google-plus"></i>
							</a>
						</div>	
					</div>
				</div>
				<hr class="bk-margin-off">
				<div class="panel-body bk-bg-white">
					<blockquote style="word-wrap:break-word;color:#121212;font-size:16px;"><p>{$moder['content']}</p></blockquote>
					<div class="actions">
						<div class="btn-group">
							<if condition="$moder['iselite'] eq 0 ">
								<a href="javascript:article_iselite({$moder.id});"><i class="glyphicon glyphicon-thumbs-up" ></i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<else />
								<a href="javascript:article_iselite({$moder.id});"><i class="glyphicon glyphicon-thumbs-up"  style="color:red;"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</if>
							<a href="javascript:article_status({$moder.id});"><i class="glyphicon glyphicon-remove" style="color:red;"></i></a>									
						</div>
						<div class="pull-right bk-fg-primary"><strong>发布时间:</strong>{$moder['update_time']}</div>
					</div>
				</div>								
			</div>
	</div>							
</div>
</block>

<block name="script_user">
	<script type="text/javascript">
		   function article_status(id)
		   {
		   		var id = id;
		   		$.get("{:U('Article/delete')}",{id:id},function(data){
		   			if (data == 1) {
		   				window.location.href="{:U('Article/index')}";
		   			}else if(data == 2){
		   				alert('异常错误');
		   			};
		   			
		   		});
		   		// alert(id);
		   }

		   function article_iselite(id)
		   {
		   		var id = id;
		   		$.get("{:U('Article/choose')}",{id:id},function(data){
		   			if (data == 1) {
		   				window.location.reload();
		   			}else if(data == 2){
		   				window.location.reload();
		   			};
		   			
		   		});
		   		// alert(id);
		   }
	</script>
</block>